package oop1;

import java.util.Scanner;

public class Administrator {
	// 管理员和他的用户名和密码
	String name = "老刘";
	String pass = "124556";

	public void changePass() {
		Scanner in = new Scanner(System.in);
		String oldName = in.next();
		String oldPass = in.next();
		if (name.equals(oldName) && pass.equals(oldPass)) {
			System.out.println("输入正确，请输入新密码：");
			pass = in.next();// 新密码
			System.out.println("密码修改成功，用户名：" + name + ",密码是：" + pass);
		} else {
			System.out.println("密码修改失败，请提供正确的老用户和密码");
		}
	}
}
